<!--
gbl 头部文件 html
描述: 页面的头部内容
最后修改时间：9.16/21:11
-->

<header class="app-star">
    <!--  导航栏  -->
    <nav class="top" style="background-color: white; box-shadow: 0 8px 16px 0 rgba(7,17,27,0.29); height: 50px; margin-bottom: 10px;">
        <div class="container">
            <div class="top_left"  >
                <span class="glyphicon glyphicon-user"></span>
                <span data-name="span">你好请</span>
                <a href="login.html">登录</a>
                <span data-name="span">,</span>
                <a href="register.html">注册</a>
                <span  id="span_username"></span>
            </div>

            <div class="top_right">
                <a href="message.html"><span class="glyphicon glyphicon-comment" style="margin-right: 5px"></span>
                    <span  style="margin-right: 20px;">消息</span></a>
                <a href="shopcart.html"><span class="glyphicon glyphicon-shopping-cart" style="margin-right: 5px"></span>
                    <span  style="margin-right: 20px;">购物车 </span></a>
                <a href="mycolle.html" ><span class="glyphicon glyphicon-heart" style="margin-right: 5px"></span>
                    <span style="margin-right: 20px;">我的收藏</span></a>
                <a href="ordermessage.html"> <span class="glyphicon glyphicon-tasks" style="margin-right: 5px"></span>
                    <span  style="margin-right: 20px;">我的订单</span></a>
            </div>

        </div>
    </nav>
    <!-- 搜索栏 -->
    <div class="top_two">
        <div class="container">
            <div class="logo">
                <p id="image_logo"><img src="img/timg01.jpg" width="80%" min-width="100px" height="60px"></p>
            </div>
            <!--<div class="address">-->
            <!--<div id="dress" class="" style="display: block">-->
            <!--<span>苏州</span>-->
            <!--</div>-->
            <!--</div>-->
            <div class="search">
                <div class="search_bar">
                    <form>
                        <input type="text" id="seek_index" placeholder="请输入:城市/标签/美食...">
                        <button type="submit" onclick="seekBtn()" ><img src="img/find.png"></button>
                    </form>
                </div>
            </div>
            <div class="the_other" style="">
                <!--   相关信息   -->
            </div>
        </div>
    </div>
    <!-- &lt;!&ndash; 选项菜单 -->
    <div class="top_three" style="background-color: #7BA7AB">
        <div class="container Position" >
            <div class="row">
                <div class="col-xs-1"><div class="row"><div class="col-md-1"><a href="home.html">首页</a></div></div></div>
                <a href="#hot01"> <div class="col-xs-1"><div class="row"><div class="col-md-1">热门美食</div></div></div></a>
                <a href="#hot02"> <div class="col-xs-1"><div class="row"><div class="col-md-1">特色餐厅</div></div></div></a>
                <div class="col-xs-1"><div class="row"><div class="col-md-1"></div></div>
                    <div class="col-xs-1"><div class="row"><div class="col-md-1"></div></div></div>
                    <div class="col-xs-1"><div class="col-md-1"></div></div></div>
                <div class="col-xs-1"><div class="col-md-1"></div></div></div>
            <div class="col-xs-1"><div class="col-md-1"></div></div></div>
        <div class="col-xs-1"><div class="col-md-1"></div></div></div>
    <div class="col-xs-1"><div class="col-md-1"></div></div></div>
    <div class="col-xs-1"><div class="col-md-1"></div></div></div>
    <div class="col-xs-1"><div class="col-md-1"></div></div></div>
    </div>
    </div>
    </div>
</header>


<script src="js/quote/jquery-3.4.1.js"></script>
<script src="eatwebjs/head.js" charset="UTF-8"></script>
<script>

    $.get("user/finduser",{},function (data) {
        if(data.length>0){
            $(".top_left a").attr("hidden","hidden");
            $(".top_left span[data-name='span']").attr("hidden","hidden");
            var msg = "欢迎回来，"+data+'&nbsp;&nbsp;&nbsp;&nbsp;   <a href="user/exitServlet">退出</a>';
            console.log(data);
            $("#span_username").html(msg);
        }
    });

    // $.get("area/findArea",{},function (data) {
    //     if(data.length>0){
    //         var msg = data;
    //         console.log(data);
    //         $("#dress span").test(msg);
    //     }
    // })

</script>